Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent memory leaks if invalid parameters are passed to plugin constructors. #73

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

psobot
Copy link
Member

@psobot psobot commented Feb 3, 2022

Using new in the Python bindings for Plugin instances causes each plugin instance to be leaked if an exception is thrown by any of the set methods in the py::init. This PR replaces all of those new calls with std::make_unique.

@psobot psobot added the bug Something isn't working label Feb 3, 2022
@psobot psobot merged commit 4cffa62 into master Feb 3, 2022
@psobot psobot deleted the psobot/prevent-leaks-on-constructor-error branch February 3, 2022 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants